{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Populating the interactive namespace from numpy and matplotlib\n"
     ]
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "%pylab inline "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEXCAYAAACzhgONAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VIXV//HPYZMlyG5kB0VFFkUCwa0KWutSq9aqdWO3\nVH1stVWf4vKztrV91FptbV1KBQm4oNS1aq0bcasQCLIjgsgmCLIT9iTn98e91DFNQjIkuZO53/fr\nNa/MXebec+bCPXOXOWPujoiISFnqRB2AiIikNhUKEREplwqFiIiUS4VCRETKpUIhIiLlUqEQEZFy\nqVBItTIzN7Nu4fPxZnZXDa33n2Y2tCbWVd3MrJGZ/cPMtpjZ5HDcXWa23sy+jDq+yjCz+WY2MOo4\npHJUKGS/zOxyM5thZgVmtibcCZ8cdVz7mNmdZvZE4jh3P9vdc6phXePNbE/4Xmw0szfNrHtVr6eE\ni4BMoJW7X2xmnYAbgR7ufmhlF2ZmuWZ2VTnTu4QFvqDE44fJpxBw957unnugy5GapUIh5TKznwN/\nBH5HsLPqBDwMnB9lXBG7190zgA7AOmB8Na+vM/CpuxeGw52ADe6+rprX29zdMxIez1TnysysXnUu\nXw6Au+uhR6kPoBlQAFxczjzZwEfAZmAN8BegQcJ0B7qFz8cDd5WxnDrA7cBygp3vBKBZOK1LuJxR\nwOpwPTeF084C9gB7w1hnh+NzgasqseyhwApgPXBbOfl+Iwfgu0DB/t4L4CHgDyWW9TLws/D50WHM\nm4H5wHnh+F+VyO/HwE6gOBweX0qMLYBXgK+ATeHzDuG03wJFwK7w9X8p5fX73pN6pUxrAMwCfhIO\n1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\nad9mXNJaIzObFT5/n6CldDtguQc/3FLSacBkd18P4O77fhDm20CP4EwVAAebWYa7FyS8tj7wFzPr\nQ9DO+siqSMDdC8wsi2BnPQh4xsxGu/v4A1hsW+CrhOFRBL9oeJKZHQXc4u7LwmnrCN4zkTKpUEht\nttPd+ySOCHf22yu5nDrA8e6+q5x5fgasBY4N5y9v3kpx9yIgF8g1s7kErbLHH8AidwINE5a/APie\nmf2WoL30WILOqoTz7TyAdUkM6NSTxMk7wMXhxV7MrGU4/g3gJ/tmCo8aSmoGrAkvjA8G6objtwFN\nkw3IzI4ysyMSRvUh+F3vA7GQ4Pej962jV/h0L0En2cR4jyS4liNSJhUKiQ13nw/8FnjXzGYTXOQF\n+CnQL7zIvYDgtxxKehgYGr6uO18ftcwBisKL48lczM4AcsxsgZnNAXoAdyaxnESvAgMThq81s38T\ntKh+lODC9j6DwvlFyqTbY0XSkJl9AJzr7psTxt3p7ncmDB8EvAuc7O6FNR+l1BY6ohBJTzcS/PJb\notwSw50IvlOhIiHl0hGFSAoysxcIfqo00S/c/V9RxCPxpkIhIiLl0qknEREplwqFiIiUS4VCRETK\npUIhIiLl+v+FudKxQidIjgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x106d33c90>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "price = np.arange(900,1000,1)\n",
    "strike = 940\n",
    "premium = 7.5\n",
    "payoff = [max(-premium, i - strike-premium) for i in price] \n",
    "plt.plot(price, payoff)\n",
    "plt.xlabel('Price at T S_T ($)')\n",
    "plt.ylabel('payoff')\n",
    "plt.title('Call option Payoff at Expiry')\n",
    "plt.grid(True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEXCAYAAACzhgONAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAI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BbgQKA0Pcr9LcC2H\nmm4HRobP24utey3zgM3hwfGmHMwuAiaZ2btmNg/oDVzZhPXEegIoi3l8rpn9myCiehzBge1qg8Pl\nReqk02NFMpCZvQwc6+6rYqZd6e5XxjzOB2YCB7l7VfKrlHShPQqRzHQxwZXfYpXXeLwLwd9UqElI\nXNqjEElBZvYowaVKY13q7s9EUY9kNzUKERGJSz89iYhIXGoUIiISlxqFiIjEpUYhIiJx/T9HX3Mr\nAriyzQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x106d06690>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "price = np.arange(900,1000,1)\n",
    "strike = 960\n",
    "premium = 19.5\n",
    "payoff = [max(-premium, strike - i -premium) for i in price] \n",
    "plt.plot(price, payoff)\n",
    "plt.xlabel('Price at T S_T ($)')\n",
    "plt.ylabel('payoff')\n",
    "plt.title('Put option Payoff at Expiry')\n",
    "plt.grid(True)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
